Skip to content

[rel-db] Fix meeting.import#3287

Merged
luisa-beerboom merged 9 commits intoOpenSlides:feature/relational-dbfrom
luisa-beerboom:rel-db-fix-meeting-import-cherry-pick
Jan 29, 2026
Merged

[rel-db] Fix meeting.import#3287
luisa-beerboom merged 9 commits intoOpenSlides:feature/relational-dbfrom
luisa-beerboom:rel-db-fix-meeting-import-cherry-pick

Conversation

@luisa-beerboom
Copy link
Copy Markdown
Member

Rebase was being difficult, so I cherry picked the commits instead.

Replaces #3281

@luisa-beerboom luisa-beerboom added this to the 4.3 milestone Jan 23, 2026
@luisa-beerboom luisa-beerboom added the enhancement General enhancement which is neither bug nor feature label Jan 23, 2026
Copy link
Copy Markdown
Contributor

@vkrasnovyd vkrasnovyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! I like that you've also added missing test cases and data assertions.
I've added comments about rel-db specific syntax.

Comment thread tests/system/action/meeting/test_clone.py Outdated
Comment on lines +2146 to +2152
"user/1": {
"organization_management_level": None,
"committee_ids": [1],
"committee_management_ids": [1],
},
"committee/60": {"user_ids": [1], "manager_ids": [1]},
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case committee_ids and committee_management_ids should be 60. And it's not even needed to set these fields manually because they are a back relation and a calculated field.

I'd suggest using self.set_committee_management_level([60]) instead of manually setting these 4 fields.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, also used set_organization_management_level

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case you can also get completely rid of set_models by updating self.meeting_data before calling self.set_test_data_with_admin()

Comment thread tests/system/action/meeting/test_import.py Outdated
Comment thread tests/system/action/meeting/test_import.py Outdated
Comment thread tests/system/action/meeting/test_import.py Outdated
except InvalidOperation:
raise ActionException(
f"{self.own_field_name}: value '{value}' couldn't be converted to decimal."
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love that error message for this error became more descriptive.

Comment thread tests/system/action/meeting/test_import.py Outdated
Comment thread tests/system/action/meeting/test_clone.py Outdated
@luisa-beerboom luisa-beerboom merged commit 8c4e303 into OpenSlides:feature/relational-db Jan 29, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement General enhancement which is neither bug nor feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants